fw_tune()
{
    $INSTALL -D -m 644 ${BSP_GENERICFS_DIR}/eyespy-splash.png ${ROOTFS_DIR}/usr/share/dancesplashfb/artwork/eyespy-splash.png || error
    echo "image /usr/share/dancesplashfb/artwork/eyespy-splash.png" > ${ROOTFS_DIR}/etc/dancesplashfb.conf
    echo "fontsize 14" >> ${ROOTFS_DIR}/etc/dancesplashfb.conf

    rm -rf ${ROOTFS_DIR}/var/www/htdocs
    cp -a ${BSP_SRC_DIR}/htdocs-eyespy ${ROOTFS_DIR}/var/www/htdocs
    find ${ROOTFS_DIR}/var/www -name ".svn" | xargs rm -rf

    ln -sf camsview.php ${ROOTFS_DIR}/var/www/htdocs/index.php

    mkdir -p ${ROOTFS_DIR}/var/run/motion
    mkdir -p ${ROOTFS_DIR}/var/www/htdocs/cams/default
    $INSTALL -D -m 644 ${BSP_GENERICFS_DIR}/motion/motion.conf-eyespy ${ROOTFS_DIR}/etc/motion.conf

    $INSTALL -D -m 755 ${BSP_GENERICFS_DIR}/motion/premotion.init ${ROOTFS_DIR}/etc/init.d/premotion || error "install init file"
    install_rc_start premotion 94

    echo "eyespy" > $ROOTFS_DIR/etc/hostname

    $INSTALL -D -m 755 ${BSP_GENERICFS_DIR}/rc.local-eyespy ${ROOTFS_DIR}/etc/rc.local
    sed -i -s "s|@BUILD@|`date +%Y/%m/%d`|" ${ROOTFS_DIR}/etc/rc.local
}

fw_tune
